FreeSWITCH Cookbook by Minessale Anthony

FreeSWITCH Cookbook by Minessale Anthony

Author:Minessale, Anthony
Language: eng
Format: epub
Publisher: Packt Publishing Ltd


Save the file and exit.

Make the file executable with this command: chmod +x /usr/lib/cgi-bin/cdr.pl

Log in to fs_cli and press F6 or issue the reloadxml command.

Make a test call and you should see the XML CDR contents in the /tmp/cdr.txt file.

How it works...

This is a simple Perl-based CGI script. All it does is pull the cdr parameter out of the POST data that is submitted by mod_xml_curl. Once it has this value (in the variable $raw_cdr) it dumps the CDR into the temporary file named /tmp/cdr.txt.

While this example is not particularly useful for production, it demonstrates the minimal steps required to get the POSTed CDR data into the system. If you are more comfortable with another scripting language, such as PHP, Python, or Ruby, you may just as easily process the CDRs with those languages. Here is a simple version in PHP:

$raw_cdr = $_POST['cdr']; $writefile = fopen('/tmp/dump.txt',"w"); fwrite($writefile, $raw_cdr); fclose($writefile);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Kubernetes in Production Best Practices by Aly Saleh & Murat Karslioglu(6788)
Optimizing Microsoft Azure Workloads by Rithin Skaria(6328)
Kubernetes in Production Best Practices by Aly Saleh and Murat Karslioglu(6060)
Cloud Computing Demystified for Aspiring Professionals by David Santana(5171)
Zed Attack Proxy Cookbook by Ryan Soper & Nestor N Torres & Ahmed Almoailu(4598)
Google Cloud for Developers: Write, migrate, and extend your code by leveraging Google Cloud by Hector Parra Martinez(3579)
Mastering Cyber Intelligence by Jean Nestor M. Dahj;(3282)
AWS Observability Handbook by Phani Kumar Lingamallu & Fabio Braga de Oliveira(3198)
The Road to Azure Cost Governance by Paola E. Annis Giuliano Caglio(2811)
Microsoft 365 Fundamentals Guide by Gustavo Moraes and Douglas Romão(2256)
Agile Security Operations: Engineering for Agility in Cyber Defense, Detection, and Response by Hinne Hettema(1792)
Cloud Identity Patterns and Strategies: Design enterprise cloud identity models with OAuth 2.0 and Azure Active Directory by Giuseppe Di Federico Fabrizio Barcaroli(1777)
Bootstrapping Service Mesh Implementations with Istio by Anand Rai(1674)
The Road to Azure Cost Governance: Techniques to tame your monthly Azure bill with a continuous optimization journey for your apps by Paola E. Annis Giuliano Caglio(1267)
Zed Attack Proxy Cookbook: Hacking tactics, techniques, and procedures for testing web applications and APIs by Ryan Soper Nestor N Torres Ahmed Almoailu(1200)
Agile Security Operations: Engineering for agility in cyber defense, detection, and response by Hinne Hettema(1199)
Linux Administration Best Practices: Practical Solutions to Approaching the Design and Management of Linux Systems by Scott Alan Miller(1136)
DevSecOps in Practice with VMware Tanzu: Build, run, and manage secure multi-cloud apps at scale on Kubernetes with the Tanzu portfolio by Parth Pandit Robert Hardt(1085)
Terraform for Google Cloud Essential Guide by Bernd Nordhausen(893)
Becoming KCNA Certified by Dmitry Galkin(875)